package com.zhupanlin.product.service.impl;

import com.zhupanlin.product.bean.Product;
import com.zhupanlin.product.service.ProductService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

/**
 * 描述信息：
 *
 * @author zhupanlin
 * @version 1.0
 * @date 2025/1/23 14:32
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Override
    public Product getProductById(Long productId) {
        Product product = new Product();

        product.setId(productId);
        product.setPrice(new BigDecimal("99"));
        product.setProductName("苹果");
        product.setNum(2);

        System.out.println("hello");

        /*try {
            TimeUnit.SECONDS.sleep(100);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }*/

        return product;
    }
}